Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Macro benchmark tests for CT instance creation SDK-3721 #604

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

piyush-kukadiya
Copy link
Contributor

Includes following,

  1. New macro benchmark test module containing tests [currently only CT instance creation methods are being tested]
  2. New benchmark app for supporting tests under macro benchmark test module
  3. Minor changes in gradle files to support creation of above two modules.

…entiate macro benchmarking for different methods of CT instance creation. SDK-3721
# Conflicts:
#	sample/build.gradle
#	sample/src/main/AndroidManifest.xml
@piyush-kukadiya piyush-kukadiya changed the title Macro benchmark tests for CT instance creation Macro benchmark tests for CT instance creation SDK-3721 Apr 24, 2024
@@ -144,6 +145,7 @@ dependencies {
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-crashlytics")
implementation("com.google.firebase:firebase-analytics")
implementation libs.profileinstaller
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this dependency?

Comment on lines +34 to +62
-dontwarn android.telephony.HwTelephonyManager
-dontwarn com.huawei.android.os.BuildEx$VERSION
-dontwarn com.huawei.android.telephony.ServiceStateEx
-dontwarn com.huawei.hianalytics.process.HiAnalyticsConfig$Builder
-dontwarn com.huawei.hianalytics.process.HiAnalyticsConfig
-dontwarn com.huawei.hianalytics.process.HiAnalyticsInstance$Builder
-dontwarn com.huawei.hianalytics.process.HiAnalyticsInstance
-dontwarn com.huawei.hianalytics.process.HiAnalyticsManager
-dontwarn com.huawei.hianalytics.util.HiAnalyticTools
-dontwarn com.huawei.libcore.io.ExternalStorageFile
-dontwarn com.huawei.libcore.io.ExternalStorageFileInputStream
-dontwarn com.huawei.libcore.io.ExternalStorageFileOutputStream
-dontwarn com.huawei.libcore.io.ExternalStorageRandomAccessFile
-dontwarn com.xiaomi.channel.commonutils.android.Region
-dontwarn com.xiaomi.mipush.sdk.MiPushClient
-dontwarn com.xiaomi.mipush.sdk.MiPushMessage
-dontwarn com.xiaomi.mipush.sdk.PushMessageReceiver
-dontwarn kotlin.jvm.internal.SourceDebugExtension
-dontwarn okhttp3.Call
-dontwarn okhttp3.Callback
-dontwarn okhttp3.OkHttpClient$Builder
-dontwarn okhttp3.OkHttpClient
-dontwarn okhttp3.Request$Builder
-dontwarn okhttp3.Request
-dontwarn okhttp3.Response
-dontwarn org.bouncycastle.crypto.BlockCipher
-dontwarn org.bouncycastle.crypto.engines.AESEngine
-dontwarn org.bouncycastle.crypto.prng.SP800SecureRandom
-dontwarn org.bouncycastle.crypto.prng.SP800SecureRandomBuilder
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these part of benchmarking?

Comment on lines +27 to +34
setContent {
ClevertapandroidsdkTheme {
// A surface container using the 'background' color from the theme
Surface(modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background) {
Greeting("Android")
}
}
}
Copy link
Collaborator

@CTLalit CTLalit Jul 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we add correct title and Logo as bare minimum?

android:theme="@style/Theme.Clevertapandroidsdk">
<profileable
android:shell="true"
tools:targetApi="29" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this have to match with android api which we use?

Comment on lines +34 to +42
<meta-data
android:name="CLEVERTAP_ACCOUNT_ID"
android:value="67Z-RRK-696Z" />
<meta-data
android:name="CLEVERTAP_TOKEN"
android:value="322-1a6" />
<meta-data
android:name="CLEVERTAP_REGION"
android:value="eu1" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we remove these secrets?

Comment on lines +36 to +61
CleverTapAPI.setDebugLevel(VERBOSE)

/**
* "bm(benchmark method)" is being passed from macro benchmark tests to tell the Activity which method to benchmark
*/
when(intent?.extras?.getString("bm") ?: ""){
"initCT" -> trace("init CT") {
// val measureNanoTime = measureNanoTime {
// cleverTapDefaultInstance = CleverTapAPI.getDefaultInstance(this)
val config = CleverTapInstanceConfig.createInstance(this, "TEST-R78-ZZK-955Z", "TEST-311-ba2")
val cleverTapDefaultInstance = CleverTapAPI.instanceWithConfig(this, config)
// }
// Logger.v("nano time ct init = $measureNanoTime")
}

"initCTD" -> trace("init CTD") {
// val measureNanoTime = measureNanoTime {
val cleverTapDefaultInstance = CleverTapAPI.getDefaultInstance(this)
// }
// Logger.v("nano time ct init = $measureNanoTime")
}
else -> Log.d("MainActivity","no method specified by benchmark module")
}



Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extract in method. Format correctly.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets delete this.

Copy link
Collaborator

@CTLalit CTLalit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants